#ifndef GUI_KEY_H
#define GUI_KEY_H

#include "GUI.h"

#undef EXT
#ifdef GUI_KEY_C
#define EXT
#else
#define EXT extern
#endif

#define KEY_PRESS 0
#define KEY_UNPRESS 1

#define GUI_KEY_F1 0x04
#define GUI_KEY_F2 0x03
#define GUI_KEY_F3 0x02
#define GUI_KEY_F4 0x01
#define GUI_KEY_KNIFE 0x11
#define GUI_KEY_MENU  0x13
#define GUI_KEY_LOADPAPER 0x1C
#define GUI_KEY_START_POINT 0x24
#define GUI_KEY_SHIFT 0x1A
#define GUI_KEY_RESET 0x1A
#define GUI_KEY_VACUUM 0x12
#define GUI_KEY_REDO 0x23
#define GUI_KEY_ENTER 0x1B
#define GUI_KEY_UP 0x0C
#define GUI_KEY_DOWN 0x0B
#define GUI_KEY_LEFT 0x0A
#define GUI_KEY_RIGHT 0x09
#define GUI_KEY_PAUSE 0x14
//---------
#define GUI_KEY_CANCEL 0x30

typedef struct
{
  INT8U Value;
  INT8U Event;
  
}S_Key_Info;

EXT volatile S_Key_Info Cur_Key;
EXT volatile INT8U OldKey;

EXT volatile INT8U Print_Pause_Flag;
EXT void GUI_Get_Key_Info(INT8U *pKey,INT8U *pEvent);
EXT INT8U GUI_Get_Key_Value(void);
/*
#ifdef GUI_KEY_C
EXT const INT8U Key_Map[][2]=
{
  {0x11,'0'},  
  {0x12,'1'},
  {0x14,'2'},
  {0x18,'3'},
  {0x21,'4'},
  {0x22,'5'},
  {0x24,'6'},
  {0x28,'7'},
  {0x41,'8'},
  {0x42,'9'},
  {0x44,GUI_KEY_LEFT},
  {0x48,GUI_KEY_RIGHT},
  {0x81,GUI_KEY_UP},
  {0x82,GUI_KEY_DOWN},
  {0x84,GUI_KEY_TAB},
  {0x88,GUI_KEY_ENTER}
  
  
};

#endif
*/
EXT volatile INT8U Cur_Press_Key;
EXT void Wait_Pause_Key(void);
EXT INT8U GUI_Get_Key(void);
EXT void Pause_Key_Press_Proc(void);
EXT INT8U GUI_Get_Pressing_Key(void);
#endif
